import Router from "vue-router";
import Vue from "vue";
import Home from "../../src/views/home/home.vue";
import About from "../../src/views/about/about.vue";
import Tag from "../../src/views/tag/tag.vue";
import Allfile from "../../src/views/allFile/allfile.vue";
import Spetopic from "../../src/views/spetopic/spetopic.vue";
import Mesboard from "../../src/views/messageBoard/mesboard.vue";
import aboutMe from "../../src/views/aboutMe/aboutMe.vue";
// import Project from "../../src/views/productSource/projectsource.vue";
import detail from "../../src/views/detail/detail.vue";
import { mapGetters } from "vuex";
Vue.use(Router);
const routes = [
  {
    path: "/",
    name: "home",
    component: Home,
  },
  {
    path: "/about",
    name: "about",
    component: About,
  },
  {
    path: "/tag/:id?",
    name: "tag",
    component: Tag,
    props: true,
  },
  {
    path: "/allfile",
    name: "allfile",
    component: Allfile,
  },
  {
    path: "/spetopic",
    name: "spetopic",
    component: Spetopic,
  },
  {
    path: "/mesboard",
    name: "mesboard",
    component: Mesboard,
  },
  {
    path: "/aboutMe",
    name: "aboutMe",
    component: aboutMe,
  },
  {
    path: "/detail/:id?",
    name: "detail",
    component: detail,
  },
];
// 创建路由的实例
const router = new Router({
  routes,
});
// 权限校验

export default router;
